<?php
namespace App\Services;
use App\Models\Balance;

class FlowService {

    public static function store($input = []) {
        Balance::create([
            'type' => $input['type'],
            'service_id' => $input['service_id'],
            'material_id' => $input['material_id'],
            'order_id' => $input['order_id'],
            'user_id' => $input['user_id'],
            'admin_id' => $input['admin_id'],
            'pay_type' => $input['pay_type'],
            'amount' => $input['amount'],
            'status' => $input['amount'] > 0 ? 1 : 0,
        ]);
    }

}